import { AxiosResponse } from "axios";
import { SERVICE_CONFIG } from "../_base";
import service from "@/api";

/**缓存服务 */
const baseUrl = SERVICE_CONFIG.ORG + "/org/BomfCacheService";
/**
 * 删除所有缓存
 */
export function removeAllCache(): Promise<AxiosResponse<any>> {
  let url = baseUrl + "/removeAllCache";
  return service.get(url);
}

/**
 * 删除数据字典缓存
 */
export function removeCacheCodeList(): Promise<AxiosResponse<any>> {
  let url = baseUrl + "/removeCacheCodeList";
  return service.get(url);
}

/**
 * 删除树缓存
 */
export function removeCacheTreeList(): Promise<AxiosResponse<any>> {
  let url = baseUrl + "/removeCacheTreeList";
  return service.get(url);
}

/**
 * 删除组织机构缓存
 */
export function removeOrgCache(): Promise<AxiosResponse<any>> {
  let url = baseUrl + "/removeOrgCache";
  return service.get(url);
}

/**
 * 删除bean缓存
 */
export function removeBeanCache(): Promise<AxiosResponse<any>> {
  let url = baseUrl + "/removeBeanCache";
  return service.get(url);
}
